#include "../mds/step.h"

static
void __mds_step_update_nothing( mds_frame *frame, void *data )
{
#if defined(__INTEL_COMPILER)
#	pragma warning ( disable : 869 )
#endif
	assert( frame != NULL );
	assert( NULL  == data );
}



static
void __mds_step_init_t_nothing( mds_frame *frame, Real dt, void *data )
{
#if defined(__INTEL_COMPILER)
#	pragma warning ( disable : 869 )
#endif
	assert( frame != NULL );
	assert( NULL == data );
}

void mds_nothing_step_load( mds_step *step, void *data )
{
	assert( step );
	memset( step, 0, sizeof(mds_step) );
	step->data      = data;
	step->predict  = __mds_step_update_nothing;
	step->correct  = __mds_step_update_nothing;
	step->init_dt  = __mds_step_init_t_nothing;
	step->num_sets = 3;
}

void mds_step_init_dt(mds_step *step, mds_frame *frame, Real dt )
{
	assert( step );
	assert( step->init_dt );

	step->init_dt( frame, dt, step->data );
}



void mds_step_predict( mds_step *step, mds_frame *frame )
{
	assert( step );
	assert( frame );
	assert( step->predict );
	step->predict( frame, step->data );
}

void mds_step_correct( mds_step *step, mds_frame *frame )
{
	assert( step );
	assert( frame );
	assert( step->correct );
	step->correct( frame, step->data );
}

